package com.shiguiwu.springboot3.agent;

/**
 * @description: aa
 * @author: stone
 * @date: Created by 2023/12/2 13:49
 * @version: 1.0.0
 * @pakeage: com.shiguiwu.springboot3.agent
 */
public class TimeStatistics {

    public static ThreadLocal<Long> t = new ThreadLocal<>();

    public static void start() {
        t.set(System.currentTimeMillis());
    }
    public static void end() {
        long time = System.currentTimeMillis() - t.get();
        System.out.println(Thread.currentThread().getStackTrace()[2] + " spend: " + time);
    }
}
